package com.woniuxy.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 马宇航
 * @Todo: 广播的监听器
 * @DateTime: 25/03/11/星期二 16:29
 * @Component: 成都蜗牛学苑
 **/
@Component
public class RouteListener {
    @RabbitListener(queues = "routeQueue1",ackMode = "AUTO")
    public void fanoutQueue1(String msg) {
        System.out.println(msg+",路由直连模式，模拟邮件发送！");
    }
    @RabbitListener(queues = "routeQueue2",ackMode = "AUTO")
    public void fanoutQueue2(String msg) {
        System.out.println(msg+",路由直连模式，模拟短信发送！");
    }
}
